| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | Public Attributes | Static Public Attributes | List of all members
nkScripts::FunctionParameter Struct Referencefinal

A function parameter, used within the stack of arguments. More...

## Public Member Functions
| FunctionParameter () noexcept
| FunctionParameter (bool val) noexcept
| FunctionParameter (int val) noexcept
| FunctionParameter (float val) noexcept
| FunctionParameter (double val) noexcept
| FunctionParameter (const char *val) noexcept
| FunctionParameter (nkMemory::StringView val) noexcept
| FunctionParameter (void *val, nkMemory::StringView userTypeName, bool scriptOwner) noexcept
| FunctionParameter (const ScriptObjectReference &scriptObjectReference) noexcept
| FunctionParameter (const FunctionParameter &other) noexcept
| FunctionParameter (FunctionParameter &&other) noexcept
| ~FunctionParameter ()
void | prepareForInternalType ()
void | prepareForString ()
void | prepareForUserType ()
void | prepareForScriptObjectReference ()
FunctionParameter & | operator= (const FunctionParameter &other) noexcept
FunctionParameter & | operator= (FunctionParameter &&other) noexcept

## Public Attributes
union {
bool _valBool
int _valInt
float _valFloat
double _valDouble
nkMemory::String _valString
UserTypeHolder _valUser
ScriptObjectReference _valScriptObject
}; |
FUNCTION_PARAMETER_TYPE | _type
| The actual type of the variable held.

## Static Public Attributes
static FunctionParameter | VOID

## Detailed Description

A function parameter, used within the stack of arguments.

## Constructor & Destructor Documentation

## ◆ FunctionParameter() [1/11]

nkScripts::FunctionParameter::FunctionParameter | ( |  | ) |
| noexcept

Default constructor.

## ◆ FunctionParameter() [2/11]

nkScripts::FunctionParameter::FunctionParameter | ( | bool | val | ) |
| explicit noexcept

Specific constructor.

Parameters

  val | The value to assign.

## ◆ FunctionParameter() [3/11]

nkScripts::FunctionParameter::FunctionParameter | ( | int | val | ) |
| explicit noexcept

Specific constructor.

Parameters

  val | The value to assign.

## ◆ FunctionParameter() [4/11]

nkScripts::FunctionParameter::FunctionParameter | ( | float | val | ) |
| explicit noexcept

Specific constructor.

Parameters

  val | The value to assign.

## ◆ FunctionParameter() [5/11]

nkScripts::FunctionParameter::FunctionParameter | ( | double | val | ) |
| explicit noexcept

Specific constructor.

Parameters

  val | The value to assign.

## ◆ FunctionParameter() [6/11]

nkScripts::FunctionParameter::FunctionParameter | ( | const char * | val | ) |
| noexcept

Specific constructor.

Parameters

  val | The value to assign.

## ◆ FunctionParameter() [7/11]

nkScripts::FunctionParameter::FunctionParameter | ( | nkMemory::StringView | val | ) |
| noexcept

Specific constructor.

Parameters

  val | The value to assign.

## ◆ FunctionParameter() [8/11]

nkScripts::FunctionParameter::FunctionParameter | ( | void * | val,
|  | nkMemory::StringView | userTypeName,
|  | bool | scriptOwner
| ) |  |
| noexcept

Specific constructor.

Parameters

  val | The value to assign.
  userTypeName | The user type name of the object set.
  scriptOwner | Whether the script is the owner of given object and should delete it upon garbage collection.

## ◆ FunctionParameter() [9/11]

nkScripts::FunctionParameter::FunctionParameter | ( | const ScriptObjectReference & | scriptObjectReference | ) |
| noexcept

Specific constructor.

Parameters

  scriptObjectReference | The reference to assign.

## ◆ FunctionParameter() [10/11]

nkScripts::FunctionParameter::FunctionParameter | ( | const FunctionParameter & | other | ) |
| noexcept

Copy constructor.

Parameters

  other | The parameter to copy.

## ◆ FunctionParameter() [11/11]

nkScripts::FunctionParameter::FunctionParameter | ( | FunctionParameter && | other | ) |
| noexcept

Move constructor.

Parameters

  other | The parameter to move.

## ◆ ~FunctionParameter()

nkScripts::FunctionParameter::~FunctionParameter | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ prepareForInternalType()

void nkScripts::FunctionParameter::prepareForInternalType | ( |  | ) |

Prepares internal memory layout for the type given.

## ◆ prepareForString()

void nkScripts::FunctionParameter::prepareForString | ( |  | ) |

Prepares internal memory layout for the type given.

## ◆ prepareForUserType()

void nkScripts::FunctionParameter::prepareForUserType | ( |  | ) |

Prepares internal memory layout for the type given.

## ◆ prepareForScriptObjectReference()

void nkScripts::FunctionParameter::prepareForScriptObjectReference | ( |  | ) |

Prepares internal memory layout for the type given.

## ◆ operator=() [1/2]

FunctionParameter& nkScripts::FunctionParameter::operator= | ( | const FunctionParameter & | other | ) |
| noexcept

Copy operator.

Parameters

  other | The parameter to copy.

## ◆ operator=() [2/2]

FunctionParameter& nkScripts::FunctionParameter::operator= | ( | FunctionParameter && | other | ) |
| noexcept

Move operator.

Parameters

  other | The parameter to move.

## Member Data Documentation

## ◆ @5

union { ... }

Union of all types possible to have.

## ◆ VOID

FunctionParameter nkScripts::FunctionParameter::VOID
| static

Static parameter enabling a quick void parameter use.

The documentation for this struct was generated from the following file:

- Documentation/Headers/NilkinsScripts/Environments/Functions/FunctionParameter.h